How to follow link into a baseline

Hallo,

here is my situation: I have a module "A" with outgoing links to module "B" but also into baseline of "B".

My question is: Is it possible to follow the link into a baseline and get some information out of it.( with dxl)

I wrote a test script, which works for the links into a current, but not into a baseline.

If I select an Object which is linked to baseline and run the script …nothing happens.

Object oCur= current
Object otemp
Link l;
ModName_ ModRef;

for l in oCur ->"*" do{
    ModRef = target l
    otemp = target(l)
    print otemp."Object Text"""
    read(fullName(ModRef),true)

}

Thank you for your help

German


etleg - Mon Oct 07 09:11:17 EDT 2013

Re: How to follow link into a baseline
MichaelGeorg - Mon Oct 07 11:12:14 EDT 2013

Hello German,

to loop also through links to baselines you need to wrap an "all()" statement around the oCur..., resulting in: "for l in all(oCur -> "*") do {"

Of course afterwards you need to use targetVersion(l) and load(version, ...) to open the module, as read(fullName, ...) would still only open the current verion of the linked module.

Best regards,

Michael 

Re: How to follow link into a baseline
etleg - Tue Oct 08 02:53:07 EDT 2013

MichaelGeorg - Mon Oct 07 11:12:14 EDT 2013

Hello German,

to loop also through links to baselines you need to wrap an "all()" statement around the oCur..., resulting in: "for l in all(oCur -> "*") do {"

Of course afterwards you need to use targetVersion(l) and load(version, ...) to open the module, as read(fullName, ...) would still only open the current verion of the linked module.

Best regards,

Michael 

Thank you Michael, it worked.

But the funny thing is, tried it with "all" but I used "read" in the same test and as it didn't work properly I condemn the idea.

Thank you anyway.